home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_57294.txt < prev    next >
Text File  |  1991-02-27  |  1KB  |  25 lines

  1. -- card: 57294 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10. STANDARD STREAMS
  11.  
  12. Three streams are automatically opened when a C program begins execution:  stdin, stdout, and stderr.  These represent the standard input device, standard output device, and the device for reporting errors, respectively.
  13.  
  14. By default these devices usually refer to the user's terminal.  TC automatically creates a "console" text window on the Macintosh when a function refers to one of these streams.  (On UNIX systems these streams can be "redirected" to refer to text files, and this may be emulated on the Macintosh using TC's ccommand() console function.)
  15.  
  16. The powerful printf() and scanf() standard functions write to and read from the standard output and standard input devices.  Their prototypes are:
  17.  
  18.     int   printf(char  *format_string, ...);     /* variable number of arguments */
  19.     int   scanf(char  *format_string, ...);
  20.  
  21. The format string contains conversion codes such as %d (integer value), %ld (long 
  22.  
  23. -- part contents for background part 7
  24. ----- text -----
  25. 189